---
id: 655a15b683445611528cccf1
title: ステップ 18
challengeType: 20
dashedName: step-18
---

# --description--

At the end of your `_insert` method, after the insertion process is complete, return the current node to update the tree structure at the higher levels of the recursive call stack.


# --hints--

You should return the current node outside the conditional blocks.

```js
({ test: () => assert.match(code, /^\s{8}return\s+node/m) })
```

# --seed--

## --seed-contents--

```py
class TreeNode:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

class BinarySearchTree:
    def __init__(self):
        self.root = None

    def insert(self,key):
        self.root = self._insert(self.root, key)

--fcc-editable-region--
    def _insert(self, node, key):
        if node is None:
            return TreeNode(key)
        if key < node.key:
            node.left = self._insert(node.left, key)
        elif key > node.key:
            node.right = self._insert(node.right, key)                
--fcc-editable-region--
```
